package Work0609;

import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;

public class TestClient {

	public static void main(String[] args) throws Exception {

		AsynchronousSocketChannel channel = AsynchronousSocketChannel.open();

		channel.connect(new InetSocketAddress("localhost", 9000));

		ByteBuffer buffer = ByteBuffer.allocate(64);

		buffer.put("hello".getBytes());

		buffer.flip();

		channel.write(buffer);

	}

}